home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / HAWAIION.CMD < prev    next >
Encoding:
Text File  |  1996-02-12  |  5.1 KB  |  203 lines

  1. # login.cmd for PPP connection to Hawaii Online   4/95
  2.  
  3. # Define varaibles
  4. $echoinit = "e1"
  5. $loginprompt = "ogin:"
  6. $pwprompt = "assword:"
  7. $confirmation = "beginning..."
  8. %attempts = 10
  9.  
  10. # Load parameters stored in trumpwsk.ini
  11. %ok = [load $number]
  12. %ok = %ok + [load $othernumber]
  13. %ok = %ok + [load $username]
  14. %ok = %ok + [load $prefix]
  15. %ok = %ok + [load $modemstring]
  16. %ok = %ok + [load $password]
  17. %ok = %ok + [load $dialtype]
  18. if %ok < 5
  19.   display \n"Your login parameters are not set."\r
  20.   display "Select Dialer from the pulldown menu and click on setup.cmd."\n
  21.   abort
  22. end
  23.  
  24. # Set dial command based on dial type
  25. if $dialtype = "tone"
  26.   $dialcmd = "atdtw"
  27. else
  28.   $dialcmd = "atdpw"
  29. end
  30.  
  31. # Set the rest of the dial string
  32. if $prefix <> ""
  33.   $dialcmd = $dialcmd + $prefix
  34. end
  35.  
  36. # Check for modem
  37. output "at"\13
  38. if ! [input 10 OK\n]
  39.   display \n"Your modem is not responding. Please check the following:"\n
  40.   display "1. Make sure all cables are securely connected."\n
  41.   display "2. External modems should be plugged in and turned on."\n
  42.   display "3. Other software that can access the modem (fax managers, etc.) should be disabled."\n
  43.   display "4. Make sure the proper comm port has been selected."\n
  44.   abort
  45. end
  46.  
  47. # Send modem initialization string.  Ensure echo is enabled.
  48. if $modemstring = ""
  49.   $modemstring = "at" + $echoinit
  50. else
  51.   $modemstring = $modemstring + $echoinit
  52. end
  53. output $modemstring\13
  54. if ! [input 10 OK\n]
  55.   display \n"There is an error in the modem init string. Trying the default setting now."\n
  56.   output "at&f"\13
  57. end
  58.  
  59. # Dial into Hawaii OnLine...retry if no connection
  60. %n = 0
  61. repeat
  62.   if %n = %attempts
  63.     display \n"Maximum dial attempts reached.  Pleas try again a little latter."\n
  64.     abort
  65.   end
  66. # Alternate between phone numbers
  67.   if (%n % 2)
  68.     display \n"Dialing alternate number..."\n
  69.     outputecho 30 $dialcmd$othernumber\13
  70.   else
  71.     display \n"Dialing primary number..."\n
  72.     outputecho 30 $dialcmd$number\13
  73.   end
  74.   %notimeout = [read 15 $response]
  75.   if %notimeout & $response = "BUSY"
  76.     %ok = 0
  77.   else
  78.     %ok = [input 45 $loginprompt]
  79.   end
  80.   %n = %n + 1
  81. until %ok
  82.  
  83. #  Send username
  84. if $username = ""
  85.   username Input your username
  86. end
  87. # Note, the P preceeding the username is needed for PPP
  88. output P$username\13
  89.  
  90. # Send password
  91. input 25 $pwprompt
  92. if $password = ""
  93.   password Input your password
  94. end
  95. output $password\13
  96.  
  97. # we are now logged in
  98.  
  99. # Wait for confirmation that SLIP/PPP is working
  100. input 15 $confirmation
  101. display \nYou are now connected to the Internet!\n
  102. # login.cmd for PPP connection to Hawaii Online   4/95
  103.  
  104. # Define varaibles
  105. $echoinit = "e1"
  106. $loginprompt = "ogin:"
  107. $pwprompt = "assword:"
  108. $confirmation = "beginning..."
  109. %attempts = 10
  110.  
  111. # Load parameters stored in trumpwsk.ini
  112. %ok = [load $number]
  113. %ok = %ok + [load $othernumber]
  114. %ok = %ok + [load $username]
  115. %ok = %ok + [load $prefix]
  116. %ok = %ok + [load $modemstring]
  117. %ok = %ok + [load $password]
  118. %ok = %ok + [load $dialtype]
  119. if %ok < 5
  120.   display \n"Your login parameters are not set."\r
  121.   display "Select Dialer from the pulldown menu and click on setup.cmd."\n
  122.   abort
  123. end
  124.  
  125. # Set dial command based on dial type
  126. if $dialtype = "tone"
  127.   $dialcmd = "atdtw"
  128. else
  129.   $dialcmd = "atdpw"
  130. end
  131.  
  132. # Set the rest of the dial string
  133. if $prefix <> ""
  134.   $dialcmd = $dialcmd + $prefix
  135. end
  136.  
  137. # Check for modem
  138. output "at"\13
  139. if ! [input 10 OK\n]
  140.   display \n"Your modem is not responding. Please check the following:"\n
  141.   display "1. Make sure all cables are securely connected."\n
  142.   display "2. External modems should be plugged in and turned on."\n
  143.   display "3. Other software that can access the modem (fax managers, etc.) should be disabled."\n
  144.   display "4. Make sure the proper comm port has been selected."\n
  145.   abort
  146. end
  147.  
  148. # Send modem initialization string.  Ensure echo is enabled.
  149. if $modemstring = ""
  150.   $modemstring = "at" + $echoinit
  151. else
  152.   $modemstring = $modemstring + $echoinit
  153. end
  154. output $modemstring\13
  155. if ! [input 10 OK\n]
  156.   display \n"There is an error in the modem init string. Trying the default setting now."\n
  157.   output "at&f"\13
  158. end
  159.  
  160. # Dial into Hawaii OnLine...retry if no connection
  161. %n = 0
  162. repeat
  163.   if %n = %attempts
  164.     display \n"Maximum dial attempts reached.  Pleas try again a little latter."\n
  165.     abort
  166.   end
  167. # Alternate between phone numbers
  168.   if (%n % 2)
  169.     display \n"Dialing alternate number..."\n
  170.     outputecho 30 $dialcmd$othernumber\13
  171.   else
  172.     display \n"Dialing primary number..."\n
  173.     outputecho 30 $dialcmd$number\13
  174.   end
  175.   %notimeout = [read 15 $response]
  176.   if %notimeout & $response = "BUSY"
  177.     %ok = 0
  178.   else
  179.     %ok = [input 45 $loginprompt]
  180.   end
  181.   %n = %n + 1
  182. until %ok
  183.  
  184. #  Send username
  185. if $username = ""
  186.   username Input your username
  187. end
  188. # Note, the P preceeding the username is needed for PPP
  189. output P$username\13
  190.  
  191. # Send password
  192. input 25 $pwprompt
  193. if $password = ""
  194.   password Input your password
  195. end
  196. output $password\13
  197.  
  198. # we are now logged in
  199.  
  200. # Wait for confirmation that SLIP/PPP is working
  201. input 15 $confirmation
  202. display \nYou are now connected to the Internet!\n
  203.